package leetcode.每日一题;

/**
 * @author ：zsy
 * @date ：Created 2021/10/8 23:11
 * @description：
 */
public class 质数 {
    public static void main(String[] args) {
        for (int i = 0; i < 100; i++) {
            test(i);
        }
    }

    public static void test(int num) {
        if (num == 0 || num == 1) return;
        boolean flag = true;
        for (int i = 2; i * i <= num; i++) {
            if (num % i == 0) {
                flag = false;
                break;
            }
        }
        if (flag) {
            System.out.println(num);
        }
    }
}
